package com.jd.finance.core.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jd.finance.core.pojo.entity.AdminApply;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jd.finance.result.BaseResult;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 后台账号申请表 服务类
 * </p>
 *
 * @author LiQingBo
 * @since 2022-05-28
 */
public interface AdminApplyService extends IService<AdminApply> {

    /**
     * 添加申请账号信息
     * @param uid
     * @param userPhone
     * @param userPassword
     * @param userCon
     * @param request
     * @return
     */
    BaseResult adminAccountApply(@Param("uid") Integer uid, @Param("userPhone") String userPhone, @Param("userPassword") String userPassword, @Param("userName") String userName, @Param("userCon") String userCon, @Param("request") HttpServletRequest request);

    /**
     * 总经理 查询账号申请
     * @param pageParam
     * @param uid
     * @return
     */
    Page<AdminApply> getAccountApplyInfo(@Param("pageParam") Page<AdminApply> pageParam, @Param("uid") Integer uid);

    /**
     * 根据账号申请id，查询相应申请详情
     * @param uid
     * @param accApplyId
     * @return
     */
    BaseResult getAccountAppInfoById(@Param("uid") Integer uid, @Param("accApplyId") Integer accApplyId);

    /**
     * 审核账号申请(修改审核状态)
     * @param uid
     * @param accAppId
     * @param request
     * @return
     */
    BaseResult checkAccountApply(@Param("uid") Integer uid, @Param("accAppId") Integer accAppId, @Param("applyStatus") String applyStatus, @Param("request") HttpServletRequest request);

    /**
     * 添加后台账号
     * @param uid
     * @param accAppId
     * @param request
     * @return
     */
    BaseResult addAdminAccount(@Param("uid") Integer uid, @Param("accAppId") Integer accAppId, @Param("request") HttpServletRequest request);
}
